import type { RouteMeta } from 'vue-router';
export interface RouteItem {
  path: string;
  component: any;
  meta: RouteMeta;
  name?: string;
  alias?: string | string[];
  redirect?: string;
  caseSensitive?: boolean;
  children?: RouteItem[];
}

export interface RoleMenuParams {
  roles: string[];
}

export interface RoleMenuItem {
  path: string;
  name?: string;
  component: any;
  redirect: string;
  meta: RouteMeta;
  children: RoleMenuItem[];
}

// SaaS Landing get menu params using userId and tenantCode
export interface UserMenuParams {
  tenantCode: string | number;
  userId: string | number;
  sign?: number;
}

export interface SaaSUserMenuItem {
  id: number;
  path: string;
  name?: string;
  component: any;
  redirect: string;
  meta: RouteMeta;
  children: RoleMenuItem[];
  parentId: number;
}

export interface SaaSUserMenuParams {
  tenantCode: string;
  userId: string;
}

export type getSaaSUserMenuListResultModel = SaaSUserMenuItem[];

/**
 * @description: Get menu return value
 */
export type getMenuListResultModel = RouteItem[];

/**
 * @description: Get role menu return value
 */
export type getRoleMenuListResultModel = RoleMenuItem[];
